package org.artifact.all;

import cn.hutool.core.lang.Console;
import org.artifact.core.context.bytebuf.ArrayByteBuffFactory;
import org.artifact.core.context.bytebuf.IByteBuff;

import org.artifact.core.util.BitUtil;

/**
 * Hello world!
 *
 */
public class App 
{
    public static void main( String[] args )
    {
//    	IByteBuffFactory factory = new NettyByteBuffFactory();
//    	IByteBuff byteBuff = factory.allocate();
//    	byteBuff.writeByte((byte) 1);

//        int _value = Float.floatToIntBits(50.4f);
//
//        byte[] bytes = "123".getBytes(CharsetUtil.CHARSET_UTF_8);
//        System.out.println(bytes.length);
//    	System.out.println(Arrays.toString(bytes));


        IByteBuff iByteBuff = new ArrayByteBuffFactory().allocate();

        iByteBuff.writeLong(789456123465L);
        iByteBuff.writeLong(7894561234543265L);
        iByteBuff.writeString("fdsfdsafsda");

        Console.log(iByteBuff.readLong());
        Console.log(iByteBuff.readLong());
        Console.log(iByteBuff.readString());


    }
}
